﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;

namespace NexTrackDesktop.ViewModels
{
    /// <summary>
    /// This class links with startparty view
    /// </summary>
    class PartyStartViewModel : ViewModelBase
    {
        public ICommand StartMusicCommand { get; private set; }

        public string PartyCode
        {
            get { return Client.Party.AccessCode; }
        }

        public string PartyName
        {
            get { return Client.Party.Description; }
        }

        public PartyStartViewModel()
        {
            StartMusicCommand = new DelegateCommand(StartMusic, CanStartMusic);
        }

        void StartMusic()
        {
            Client.StartMusic();
        }

        bool CanStartMusic()
        {
            return Client.Party.Playlist.Items.Count > 0;
        }
    }
}
